﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="event_add.aspx.cs" Inherits="admin_UKNOW_event_event_add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>活动信息 </title>
    <link href="../../css/default.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jUtility.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../common/calendar.js"></script>

    <script type="text/javascript" src="../../../fckeditor/fckeditor.js"></script>

    <script type="text/javascript" src="../../js/jquery-1.4.2.min.js"></script>

    <script type="text/javascript">
        window.onload = function() {
            if (document.getElementById("content")) {
                var fck = new FCKeditor('content');
                fck.BasePath = "../../../fckeditor/";
                fck.Width = "99%";
                fck.Height = "600px"
                fck.ReplaceTextarea();
            }

            //initTextarea("concact");
        }
        function initTextarea(id) {
            if (document.getElementById(id) && document.getElementById(id).style.display != 'none') {
                var fck2 = new FCKeditor(id);
                fck2.BasePath = "../../../fckeditor/";

                fck2.Width = "99%";
                fck2.Height = "200px"
                fck2.ReplaceTextarea();
            }
        }
    </script>

</head>
<body>
    <table width="100%" height="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td height="414" align="left" valign="top" class="rightbg">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="2" bgcolor="#A49B81">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25" background="../../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav"
                                        style="background-repeat: repeat-y; background-position: left; padding-left: 6px;
                                        padding-top: 3px;">
                                        <asp:Label ID="headers" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="1" bgcolor="#B0C9E8">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="16">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" style="padding-left: 10px;">
                            <form id="form1" method="post" runat="server">
                            <asp:HiddenField ID="state" runat="server" />
                            <asp:HiddenField ID="aid" runat="server" />
                            <asp:HiddenField ID="isstaticpub" runat="server" />
                            <asp:HiddenField ID="ordernum" runat="server" />
                            <table width="95%" height="728" border="1" align="center" cellpadding="0" cellspacing="0"
                                bordercolorlight="#2583BC" bordercolordark="#ffffff">
                                <tr>
                                    <td width="100%" height="641" valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <th align="left" width="80%">
                                                    <asp:Label ID="infoname" runat="server"></asp:Label>
                                                </th>
                                                <th align="left">
                                                    <asp:LinkButton runat=server ID="lbBack" Text="返回" onclick="lbBack_Click"></asp:LinkButton>
                                                </th>
                                            </tr>
                                        </table>
                                        <br>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td width="7%" align="right">
                                                    选择同系列活动：
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList runat=server ID="ddlSeries" Width=20% 
                                                        AutoPostBack="false"></asp:DropDownList>
                                                    <asp:Button ID="ddlSer" runat="server" Text="加载内容" OnClick="ddlSeries_SelectedIndexChanged" />
                                                    <asp:CheckBox ID="synMedia" runat="server" Text="同步图像和视频" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000">* </font>活动名称：
                                                </td>
                                                <td width="75%"><nobr>
                                                    <asp:TextBox ID="title" runat="server" MaxLength="100" size="50" width=50%/>
                                                    <asp:CheckBox runat=server ID='chkIsSeriesMain' Text="" 
                                                        oncheckedchanged="chkIsSeriesMain_CheckedChanged" />该活动为系列活动主活动
                                                </nobr></td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    活动副标题：
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="txtSubTitle" runat="server" MaxLength="400" size="50" 
                                                        width=50%/>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <nobr><font color="#FF0000"> </font>活动时间（起始）：</nobr>
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="txtStartTime" runat="server" Width=50%></asp:TextBox>
                                                    <asp:CheckBox runat=server ID='chkShowEndTime' Text="" 
                                                        oncheckedchanged="chkShowEndTime_CheckedChanged" AutoPostBack=true/>显示活动截止时间
                                                </td>
                                            </tr>
                                            <tr id="trEndTime" runat=server visible=false>
                                                <td width="7%" align="right">
                                                    <nobr><font color="#FF0000"> </font>活动时间（截止）：</nobr>
                                                </td>
                                                <td width="75%"><nobr>
                                                    <asp:TextBox ID="txtEndTime" runat="server" Width=50%></asp:TextBox>
                                                </nobr></td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>活动简介：
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="summary_txt" TextMode="MultiLine" Rows="4" Columns="50" runat="server"
                                                        Height="131px" Width=50%></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <nobr>活动门票预定链接：</nobr>
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="txtTicketUrl" runat="server" MaxLength="100" size="50" width=50%/>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>活动城市：
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList ID="area_ddl" runat="server" Width="50%">
                                                        <asp:ListItem Text="--请选择--" Value="" />
                                                    </asp:DropDownList>市
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>活动地点：
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="address_txt" runat="server" Width="50%"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    活动地点地图：
                                                </td>
                                                <td align="left">
                                                    <asp:FileUpload ID="fileVenueMap" runat="server" Height="27px" Width="50%" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>艺术形式：
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList ID="art_ddl" runat="server" Width=50%>
                                                        <asp:ListItem Text="--请选择--" Value="" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>活动赞助商：
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList ID="sponsors_ddl" runat="server" Width=50%>
                                                        <asp:ListItem Text="--请选择--" Value="" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <font color="#FF0000">*</font>内容模版：
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList runat="server" ID="templateId" Width=50%>
                                                        <asp:ListItem Text="--请选择--" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="con" runat="server" visible="true">
                                            <tr>
                                                <td align="center">
                                                    <font color="#FF0000"></font>内容：
                                                </td>
                                                <td align="left">
                                                    <asp:TextBox ID="content" TextMode="MultiLine" Rows="7" Columns="35" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <font color="#FF0000">&nbsp; </font>列表图：
                                                </td>
                                                <td align="left">
                                                    <asp:FileUpload ID="file" runat="server" Height="27px" Width="547px" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <font color="#FF0000">&nbsp; </font>首页置顶图：
                                                </td>
                                                <td align="left">
                                                    <asp:FileUpload ID="filetop" runat="server" Height="27px" Width="547px" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    热点活动：
                                                </td>
                                                <td >
                                                    <asp:RadioButtonList runat="server" ID="hot_rbt" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" width="7%">
                                                    推荐活动：
                                                </td>
                                                <td width="75%">
                                                    <asp:RadioButtonList runat="server" ID="recom_rbt" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" width="7%">
                                                    首页置顶：
                                                </td>
                                                <td width="75%">
                                                    <asp:RadioButtonList runat="server" ID="indextop" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    栏目置顶：
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList runat="server" ID="columntop" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    发布状态：
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList runat="server" ID="pub" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0">
                                            <tr id="cms_mores">
                                                <td align="right">
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td height="54" colspan="3" align="center">
                                                    <asp:Button Text="保存" ID="sub3" OnClientClick="return subfunc(1)" runat="server"
                                                        OnClick="Sub_click" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            </form>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <iframe id="wait2" name="wait2" style="display: none" width="100%" height="100%"
        src="../../images/wait.gif" frameborder='0' align='middle' bgcolor='#FFFFFF'>
    </iframe>

    <script type="text/javascript">

        var o;

        function subfunc(flag) {
            if (!isFilled(form1.title)) {
                return warning('title', '活动名称不能为空!');
            }

            
            if (form1.templateId.value == "0") {
              alert("请选择模板!");
               form1.templateId.focus();
                return false;
           }

//            if (form1.area_ddl.value == "0") {
//                alert("请选活动城市!");
//                form1.area_ddl.focus();
//                return false;
//            }

//            if (form1.art_ddl.value == "0") {
//                alert("请选活动的艺术形式!");
//                form1.art_ddl.focus();
//                return false;
//            }

//            if (form1.sponsors_ddl.value == "0") {
//                alert("请选活动的赞助商!");
//                form1.sponsors_ddl.focus();
//                return false;
//            }

//            if (form1.articletype[0].checked == true) {
//                /*var oEditor1= FCKeditorAPI.GetInstance('content');
//	            
//	            if(strLen(oEditor1.GetHTML())==0){
//                //return warning('nkey','内容不能为空!');
//                alert("内容不能为空!"); 
//                oEditor1.SetHTML( '' ) ; 
//                return false;*/
//            }

            /*}else if(form1.articletype[2].checked == true){
            /if(form1.filedown.value == ""){
            alert("请上传文件!");
            return false;
            }
            }else if(form1.articletype[1].checked == true){
            if(!IsURL(form1.linkpath.value)){
            alert("请输入合法有链接地址!");
            form1.linkpath.focus();
            return false;
            }
            }*/


            form1.state.value = flag;

            return true;
        }
        function warning(FieldName, WarningString) {
            alert(WarningString);
            eval("form1." + FieldName + ".focus();");
            return (false);
        }
        function stag() {

            return true;
        }
        function addinput() {
            var pname = $("#pname").val();
            if (pname == "") {
                alert("请输入添加内容的名称！");
                return false;
            }
            $("#pname").val('');
            $("#cms_mores").after("<tr><td align=\"right\">" + pname + "：</td><td></td><td><textarea name=\"_cmsinfomore_" + pname + "\" rows=\"7\" cols=\"50\" id=\"_cmsinfomore_" + pname + "\"></textarea></td></tr>");
        }
    </script>

</body>
</html>
